package com.graduation.file.config;

import com.graduation.file.utils.MinIOUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinioConfig {

    @Bean
    public MinIOUtils minIOUtils(MinioProperties minioProperties) {
        return new MinIOUtils(
                minioProperties.getEndpoint(),
                minioProperties.getFileHost(),
                minioProperties.getBucketName(),
                minioProperties.getAccessKey(),
                minioProperties.getSecretKey()
        );
    }

}
